home *** CD-ROM | disk | FTP | other *** search
/ Mac Action 1996 January / mac-action-07.iso / mac / Inside Action / Total Distortion Big Demo / beTDTips.Dxr / 00017.ls < prev    next >
Encoding:
Text File  |  1995-06-05  |  1.3 KB  |  84 lines

  1. on JumpPage n
  2.   global NowBPage
  3.   set NowBPage to n
  4.   go(string(n))
  5. end
  6.  
  7. on PutAway
  8.   puppetSound(0)
  9.   go("exit")
  10. end
  11.  
  12. on BookHelp
  13.   Tag()
  14.   go("help")
  15. end
  16.  
  17. on initbook n
  18.   global NowBPage, BPageMax
  19.   set the immediate of sprite n to 1
  20.   set NowBPage to 1
  21.   set BPageMax to n
  22. end
  23.  
  24. on PageUp
  25.   global NowBPage, BPageMax
  26.   if NowBPage = BPageMax then
  27.     exit
  28.   else
  29.     set NowBPage to NowBPage + 1
  30.   end if
  31.   puppetSound("BookPage.SE.1")
  32.   go(string(NowBPage))
  33. end
  34.  
  35. on LastPage
  36.   global NowBPage, BPageMax
  37.   puppetSound("Kick.SE.1")
  38.   go(string(BPageMax))
  39.   set NowBPage to BPageMax
  40. end
  41.  
  42. on FirstPage
  43.   global NowBPage, BPageMax
  44.   puppetSound("Kick.SE.1")
  45.   go("1")
  46.   set NowBPage to 1
  47. end
  48.  
  49. on PageDN
  50.   global NowBPage, BPageMax
  51.   if NowBPage = 1 then
  52.     exit
  53.   else
  54.     set NowBPage to NowBPage - 1
  55.   end if
  56.   puppetSound("BookPage.SE.2")
  57.   go(string(NowBPage))
  58. end
  59.  
  60. on locSprite n
  61.   set Where to the left of sprite n
  62.   put ", " & the top of sprite n after Where
  63.   return Where
  64. end
  65.  
  66. on Tag
  67.   global tframe, tMovie, tPath
  68.   set tframe to the frame
  69.   set tPath to the pathName
  70.   set tMovie to the movie
  71. end
  72.  
  73. on gotag
  74.   global tframe, tMovie, tPath
  75.   if (tMovie = 0) or (tframe = 0) then
  76.     exit
  77.   end if
  78.   if (the pathName & the movie) = (tPath & tMovie) then
  79.     go(tframe)
  80.   else
  81.     go(tframe, tPath & tMovie)
  82.   end if
  83. end
  84.